Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Graphical JSON editor for secrets and policies #38

Merged
merged 8 commits into from
Jan 13, 2017

Conversation

msessa
Copy link
Collaborator

@msessa msessa commented Jan 13, 2017

Intro

Integrate the excellent josdejong/jsoneditor to edit secrets and policies.

Schema validation is enforced on policies to aid the operator in writing correct syntax.

Note: Root Key behaviour for secrets has been preserved.

Screenshots

Secret creation

screen shot 2017-01-13 at 11 44 14 am

Policy creation with enforced schema check

screen shot 2017-01-13 at 11 37 22 am

@RobertLippens
Copy link
Collaborator

Haven't looked at the PR yet but this looks 🥇awesome from the screenshots!

@@ -251,11 +268,12 @@ export default class Manage extends React.Component {
errorMessage: 'An error occurred.'
});
} else {
debugger;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably dont want this debugger line here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whooops sorry that slipped. I'll clean it up

@djenriquez
Copy link
Owner

Solid work man. A lot to look into, but we'll merge this in and play around with the image for bugs and what not. We'll consider this a part of 0.2.0, so its release will depend on this features stability, amongst other things.

@alexunwin hows it look to you?

@@ -0,0 +1,92 @@
import React, { PropTypes } from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we format this file with 4 spaces...looks like it using 2

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@msessa
Copy link
Collaborator Author

msessa commented Jan 13, 2017

Sounds good mate, let me know if you find any issue with the PR code and I'll fix it

currentPolicy.name = v;
} else if (e.target.name === "newRules") {
currentPolicy.rules = v;
let setNewPolicy = (v, syntaxCheckOk, schemaCheckOk) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it should be its own function, since you are reusing the same logic on L108

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@djenriquez djenriquez merged commit a9ce841 into djenriquez:master Jan 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants